package com.hy.study.demo.complexquerydemo.controller;

import com.hy.study.demo.complexquerydemo.bean.view.OrganizationQueryDTO;
import com.hy.study.demo.complexquerydemo.service.QueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path="/query")
public class QueryController {
	@Autowired
	private QueryService queryService;
	@RequestMapping(path = "Organization",method = RequestMethod.GET,consumes = MediaType.APPLICATION_JSON_VALUE,produces = MediaType.APPLICATION_JSON_VALUE)
	public Object complexQuery(@RequestBody OrganizationQueryDTO queryDto) {
		return queryService.queryOrganization(queryDto);
	}


}
